package com.party.core.model.activity;

import com.party.core.model.member.Member;
import org.hibernate.validator.constraints.NotBlank;

/**
 * 活动报名输入视图
 * party
 * Created by wei.li
 * on 2016/9/26 0026.
 */
public class ApplyInput {

    //活动编号
    @NotBlank(message = "活动编号不能为空")
    private String id;

    //报名者姓名
    @NotBlank(message = "姓名不能为空")
    private String realname;

    //手机号
    @NotBlank(message = "手机号不能为空")
    private String mobile;

    private String memberId;
    private String logo;
    private Integer sex;

    //验证码
    private String verifyCode;

    //公司信息
    private String company;

    //职位
    private String title;

    //行业
    private String industry;

    //备注信息
    private String extra;

    //微信号
    private String wechatNum;

    private String from; // 是否从签到页面来

    //分享商品主键
    private String storeGoodsId;

    // 票据ID
    private String counterfoilId;

    private Float payment;
    // 票据名称
    private String counterName;
    // 票据类型
    private Integer counterType;

    //国际区号
    private String countryCode;

    // 订单类型
    private Integer orderType;

    //分销对象编号
    private String distributorTargetId;

    //被分销者编号
    private String distributorParentId;

    //分销者
    private String distributorId;

    // 分销类型
    private Integer distributionType;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRealname() {
        return realname;
    }

    public String getWechatNum() {
        return wechatNum;
    }

    public void setWechatNum(String wechatNum) {
        this.wechatNum = wechatNum;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String getStoreGoodsId() {
        return storeGoodsId;
    }

    public void setStoreGoodsId(String storeGoodsId) {
        this.storeGoodsId = storeGoodsId;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getCounterfoilId() {
        return counterfoilId;
    }

    public void setCounterfoilId(String counterfoilId) {
        this.counterfoilId = counterfoilId;
    }

    public Float getPayment() {
        return payment;
    }

    public void setPayment(Float payment) {
        this.payment = payment;
    }

    public static Member transformMember(ApplyInput input) {
        Member member = new Member();
        member.setId(input.getMemberId());
        member.setCompany(input.getCompany());
        member.setWechatNum(input.getWechatNum());
        member.setIndustry(input.getIndustry());
        member.setLogo(input.getLogo());
        member.setJobTitle(input.getTitle());
        member.setRealname(input.getRealname());
        member.setCountryCode(input.getCountryCode());
        member.setMobile(input.getMobile());
        member.setSex(input.getSex());
        return member;
    }

    public String getCounterName() {
        return counterName;
    }

    public void setCounterName(String counterName) {
        this.counterName = counterName;
    }

    public Integer getCounterType() {
        return counterType;
    }

    public void setCounterType(Integer counterType) {
        this.counterType = counterType;
    }

    public String getCountryCode() { return countryCode; }

    public void setCountryCode(String countryCode) { this.countryCode = countryCode; }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getDistributorTargetId() {
        return distributorTargetId;
    }

    public void setDistributorTargetId(String distributorTargetId) {
        this.distributorTargetId = distributorTargetId;
    }

    public String getDistributorParentId() {
        return distributorParentId;
    }

    public void setDistributorParentId(String distributorParentId) {
        this.distributorParentId = distributorParentId;
    }

    public String getDistributorId() {
        return distributorId;
    }

    public void setDistributorId(String distributorId) {
        this.distributorId = distributorId;
    }

    public Integer getDistributionType() {
        return distributionType;
    }

    public void setDistributionType(Integer distributionType) {
        this.distributionType = distributionType;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
}
